numbers = []

with open('num.txt','r') as f:
    for line in f:
        nums_list = list(map(int,line.split()))
        numbers += nums_list
    numbers.sort()

for num in numbers:
    print(num,end=' ')